#include<stdio.h>
#include<string.h>
#include"game.h"


void game ()
{
    char board[ROW][COL];
    Initboard(board, ROW,COL );
    print (board,ROW,COL); 
    char ret;
    while(1)
     {
        playermove (board,ROW,COL);
        print (board,ROW,COL);

        ret=Iswin(board,ROW,COL);
        if (ret!='c')
         break;

        computermove(board,ROW,COL);
        print (board,ROW,COL);
        ret=Iswin(board,ROW,COL);
        if (ret!='c')
         break;
     }
     if (ret=='*')
     printf("玩家赢\n");
     if (ret=='#')
     printf ("贾哥赢\n");
     if (ret=='Q')
     printf("平局\n");

     print (board,ROW,COL); 

}



int main ()
{
    srand ((unsigned int)time (NULL));
    printf("***********欢迎来到三子棋挑战***********\n");
    printf("*************我是437贾方杰**************\n");
    printf("**********输入问题答案以发起挑战********\n");
    printf("**********问题：我喜欢的女生是谁？******\n");
    printf("****************请输入：****************\n");
    char shuru[10]="0";
    scanf("%s",shuru);
    if (strcmp(shuru,"ABB")==0)
    {
        printf("开始游戏\n");
    }
   game ();
}